package com.yazi.mxz.behavior.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.myframework.smhj.hibernate.Searching;
import com.myframework.smhj.hibernate.Page;
import com.yazi.mxz.behavior.dao.CategoryDao;
import com.yazi.mxz.behavior.entity.beans.Category;
import com.yazi.mxz.behavior.service.CategoryService;


@Service("categoryService")
public class CategoryServiceImpl implements CategoryService {
	private static Logger log = LoggerFactory.getLogger(CategoryServiceImpl.class);
	
	@Resource
	CategoryDao categoryDao;


	@Override
	public Category oneById(long catId) {
		log.debug("oneById：catId={}", catId);
		return categoryDao.get(catId);
	}
	
	@Override
	public Page<Category> list(Category category,Searching si){
		log.debug("list：");
		return categoryDao.listByExample(category, si);
	}
	
	@Override
	public Page<Category> listByGtUpdateTime(long updateTime, Searching si) {
		log.debug("listByGtUpdateTime：updateTime={},nowPage={}", updateTime, si.getNowPage());
		return categoryDao.listByGtUpdateTime(updateTime, si);
	}

	
}
